package com.mxw.account.feign;

import com.mxw.account.dto.AccountDTO;
import com.mxw.commons.restful.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @Description TODO
 * @Author RingKo
 * @Date 2021/8/24 10:04
 * @Version 1.0
 */
@FeignClient(name = "account-service", contextId = "service1")
public interface AccountFeign {
    @PostMapping("/account/insert")
    Result insert(@RequestBody AccountDTO accountDTO);

    @PostMapping("/account/delete")
    Result delete(@RequestParam("accountCode") String accountCode);

    @PostMapping("/account/update")
    Result update(@RequestBody AccountDTO accountDTO);

    @GetMapping("/account/getByCode/{accountCode}")
    Result getByCode(@PathVariable("accountCode") String accountCode);
}